<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .mask:hover{
            background-color:black;
            color: white;
        }
    </style>
</head>

<body>
    <p>这是测试<span class="mask">并且被掩盖的</span>文字！</p>
</body>

</html>